﻿<Window x:Class="Wpf.Views.DialogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        mc:Ignorable="d"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        d:DesignHeight="271"
        d:DesignWidth="412"
        SizeToContent="WidthAndHeight"
        Title="{Binding Title}" 
        Icon="/EasyPasswordGenerator;component/app.ico"
        ShowInTaskbar="False" ResizeMode="NoResize" WindowStyle="SingleBorderWindow">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Image Style="{StaticResource ImageAlerteStyle}" Grid.Row="0" Grid.Column="0" Visibility="{Binding IsError, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Image Style="{StaticResource ImageInfoStyle}" Grid.Row="0" Grid.Column="0" Visibility="{Binding IsInfo, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <TextBlock Text="{Binding Message}" Grid.Row="0" Grid.Column="1" TextWrapping="Wrap" Margin="5,5,10,5" VerticalAlignment="Center"/>
        <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button x:Name="btnCancel" IsCancel="True" Visibility="{Binding ShowCancelButton, Converter={StaticResource BooleanToVisibilityConverter}}" Content="Cancel" Margin="5,5,5,11" Width="75" Height="23"/>
            <Button x:Name="btnOk" Command="{Binding OkCommand}" IsDefault="True" Visibility="{Binding ShowOkButton, Converter={StaticResource BooleanToVisibilityConverter}}" Content="Ok" Margin="5,5,11,11" Width="75" Height="23"/>
        </StackPanel>
    </Grid>
</Window>
